package com.neutech.neusys.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.neutech.neusys.mapper.RegistLevelMapper;
import com.neutech.neusys.service.RegService;
import com.neutech.po.RegistLevel;

@Service
public class RegistLevelServiceImpl implements RegService{
	@Autowired
	private RegistLevelMapper registLevelMapper;
	/**
	 * 添加挂号级别
	 * @param：registLevel
	 * @return：成功==1，失败==0
	 */
	@Override
	public int addRegistLevel(RegistLevel registLevel) {
		// TODO Auto-generated method stub
		return registLevelMapper.addRegistLevel(registLevel);
	}
	/**
	 * 添加挂号级别界面出现之前，要查询挂号编码、挂号名称、挂号费、挂号限额
	 * @return：成功==1，失败==0
	 */
	@Override
	public List<RegistLevel> toQueryReg() {
		// TODO Auto-generated method stub
		
		return registLevelMapper.queryAll();
	}
	/**
	 * 删除按钮触发的事件：要删除对应的挂号编码、挂号名称、挂号费、挂号限额信息
	 * @param：根据id int
	 */
	@Override
	public void delRegistLevelById(int id) {
		// TODO Auto-generated method stub
		registLevelMapper.delRegistLevelById(id);
	}
}
